import { createApp } from 'vue';
import ArcoVue from '@arco-design/web-vue';
import ArcoVueIcon from '@arco-design/web-vue/es/icon';
import globalComponents from '@/components';
import store from '@/store';
import { InitLang } from '@/utils/index';
import router from './router';
import i18n from './locale';
import directive from './directive';
import './mock';
import App from './App.vue';
import '@arco-design/web-vue/dist/arco.css';
import '@/assets/style/global.less';
import '@/api/interceptor';

const createClient = async (): Promise<void> => {
  const app = createApp(App);

  app.use(ArcoVue, {});
  app.use(ArcoVueIcon);

  app.use(router);
  app.use(store);
  app.use(i18n);
  app.use(globalComponents);
  app.use(directive);

  // 初始化语言配置
  // await InitLang();

  app.mount('#app');
};

createClient();
